#pragma once

#include <OgreFrameListener.h>
#include <OISEvents.h>
#include <OISKeyboard.h>

class CMagicBox :
	public Ogre::FrameListener//, public OIS::KeyListener
{
public:
	enum STATE
	{
		INIT,
		MOVE,
		STARTED,
		TVDRAM,
		TV,
		VIDEO,
		SETUP,
		APP,
	};

	CMagicBox(void);
	~CMagicBox(void);

	void createScene(Ogre::SceneManager*);
	void createFrameListener(Ogre::Root *);
	void Start(void);
	Ogre::SceneNode* GetNode(){return mNode;}
	STATE getState(){return mState;}
	void Right();
	void Left();
	void SetState( STATE state )
	{
		mState = state;
	}

protected:
	bool frameStarted(const Ogre::FrameEvent& evt);
	bool frameEnded(const Ogre::FrameEvent& evt);

private:

private:
	Ogre::Entity* mEntity;
	Ogre::SceneNode* mNode;
	Ogre::AnimationState *mAnimationState;
	STATE mState;
};
